<div class="<?php echo $this->class; ?>"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
	<?php if ($this->headline): ?>
		<<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
	<?php endif; ?>
	<?php if(count($this->errors)>0): ?>
		<div class="errors">
			<?php for($i=0;$i<=count($this->errors);$i++): ?>
				<div class="error"><?php echo($this->errors[$i]); ?></div>
			<?php endfor; ?>
		</div>
	<?php endif; ?>
	<table class="tasks">
		<tr class="header"><th class="title">Title</th><th class="comments">Comments</th><th class="lastentry">Last Entry</th></tr>
		<?php if(count($this->tasks)>0): ?>
			<?php foreach($this->tasks as $task): ?>
				<?php if($task['show']==true): ?>
					<tr class="task">
						<td class="title"><a href="<?php echo($task['redirect']); ?>"><?php echo($task['title']); ?></a></td>
						<td class="comments"><?php echo($task['comments']); ?></td>
						<td class="lastentry"><?php if($task['comments']!=0): echo($task['lastcomment']); else: echo("&nbsp;"); endif; ?></td>
					</tr>
				<?php endif; ?>
			<?php endforeach; ?>
		<?php endif; ?>
	</table>
	
	<div class="newtask">
		Create new Task<br />
		<form action="<?php echo($href=$this->Environment->url . $this->Environment->requestUri); ?>" method="post">
			Title:
			<input type="text" name="title" size="40" maxlength="255" /><br />
			Description:
			<textarea name="description" cols=40 row=6></TEXTAREA><br />
			Type:
			<select name="task_type">
					
						<?php foreach($this->types as $type): ?>
							<option value="<?php echo($type['id']); ?>"><?php echo($type['name']); ?></option>
						<?php endforeach; ?>
					
			</select>
			<input type="hidden" name="projectid" value="<?php echo ($this->projectid); ?>">
			<input type="hidden" name="userid" value="<?php echo($this->member['id']); ?>">
			<input type="hidden" name="mode" value="new">
			<input type="hidden" name="REQUEST_TOKEN" value="<?php echo REQUEST_TOKEN; ?>">
			<input type="submit" name="submit" value="Submit" />
		</form>
	</div>
</div>